package com.yytek.nmp.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yytek.common.core.annotation.Excel;
import com.yytek.common.core.web.domain.BaseEntity;

import javax.validation.constraints.NotBlank;

/**
 * 产品对象 iot_product_info
 * 
 * @author yytek-iot
 * @date 2022-07-05
 */
@ApiModel("产品对象")
public class IotProductInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @ApiModelProperty("id")
    private Integer id;

    /** 产品唯一名称 */
    @Excel(name = "产品唯一名称")
    @ApiModelProperty("产品唯一名称")
    private String productKey;

    /** 产品别名 */
    @Excel(name = "产品别名")
    @ApiModelProperty("产品别名")
    private String productName;

    /** 节点类型(1-网关设备 2-网关子设备 3-直连设备) */
    @Excel(name = "节点类型(1-网关设备 2-网关子设备 3-直连设备)")
    @ApiModelProperty("节点类型(1-网关设备 2-网关子设备 3-直连设备)")
    private Integer nodeType;

    /** 接入协议(默认MQTT,TCP,MODBUS) */
    @Excel(name = "接入协议(默认MQTT,TCP,MODBUS)")
    @ApiModelProperty("接入协议(默认MQTT,TCP,MODBUS)")
    private String transportProtocol;

    /** 数据协议(默认json) */
    @Excel(name = "数据协议(默认json)")
    @ApiModelProperty("数据协议(默认json)")
    private String dataProtocol;

    /** 分组 */
    @Excel(name = "分组")
    @ApiModelProperty("分组")
    private String productGroup;

    /** 数据上行解析脚本 */
    @Excel(name = "数据上行解析脚本")
    @ApiModelProperty("数据上行解析脚本")
    private String dataAnalysisUp;

    /** 数据下行解析脚本 */
    @Excel(name = "数据下行解析脚本")
    @ApiModelProperty("数据下行解析脚本")
    private String dataAnalysisDown;

    /** 数据解析脚本类型 */
    @Excel(name = "数据解析脚本类型")
    @ApiModelProperty("数据解析脚本类型")
    private String dataAnalysisType;

    /** 产品key密钥 */
    @Excel(name = "产品key密钥")
    @ApiModelProperty("产品key密钥")
    private String password;

    /** 关联物模型id */
    @Excel(name = "关联物模型id")
    @ApiModelProperty("关联物模型id")
    private Long modelId;

    public void setId(Integer id)
    {
        this.id = id;
    }

    public Integer getId()
    {
        return id;
    }
    public void setProductKey(String productKey) 
    {
        this.productKey = productKey;
    }
    @NotBlank(message = "产品唯一标识不能为空")
    public String getProductKey() 
    {
        return productKey;
    }
    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }
    public void setNodeType(Integer nodeType) 
    {
        this.nodeType = nodeType;
    }

    public Integer getNodeType() 
    {
        return nodeType;
    }
    public void setTransportProtocol(String transportProtocol) 
    {
        this.transportProtocol = transportProtocol;
    }

    public String getTransportProtocol() 
    {
        return transportProtocol;
    }
    public void setDataProtocol(String dataProtocol) 
    {
        this.dataProtocol = dataProtocol;
    }

    public String getDataProtocol() 
    {
        return dataProtocol;
    }
    public void setProductGroup(String productGroup) 
    {
        this.productGroup = productGroup;
    }

    public String getProductGroup() 
    {
        return productGroup;
    }
    public void setDataAnalysisUp(String dataAnalysisUp) 
    {
        this.dataAnalysisUp = dataAnalysisUp;
    }

    public String getDataAnalysisUp() 
    {
        return dataAnalysisUp;
    }
    public void setDataAnalysisDown(String dataAnalysisDown) 
    {
        this.dataAnalysisDown = dataAnalysisDown;
    }

    public String getDataAnalysisDown() 
    {
        return dataAnalysisDown;
    }
    public void setDataAnalysisType(String dataAnalysisType) 
    {
        this.dataAnalysisType = dataAnalysisType;
    }

    public String getDataAnalysisType() 
    {
        return dataAnalysisType;
    }
    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }
    public void setModelId(Long modelId) 
    {
        this.modelId = modelId;
    }

    public Long getModelId() 
    {
        return modelId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("productKey", getProductKey())
            .append("productName", getProductName())
            .append("nodeType", getNodeType())
            .append("transportProtocol", getTransportProtocol())
            .append("dataProtocol", getDataProtocol())
            .append("productGroup", getProductGroup())
            .append("dataAnalysisUp", getDataAnalysisUp())
            .append("dataAnalysisDown", getDataAnalysisDown())
            .append("dataAnalysisType", getDataAnalysisType())
            .append("password", getPassword())
            .append("modelId", getModelId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
